<?php
//
//-------------------------------------------------
// | CreateTime: 2020/8/27 14:43
//+------------------------------------------------
// | Author: chenxueyuan
//+------------------------------------------------
// | Describe: ...
//+------------------------------------------------

namespace app\admin\validate;


use think\Validate;

class Admin extends Validate
{
    protected $rule =   [
        'name'  => 'require|max:15|min:4|unique:admin',
        'password'  => 'require|max:12|min:6',

    ];

    protected $message  =   [
        'name.require'  => '管理员账号不能为空',
        'name.max'      => '管理员账号不能大于15',
        'name.min'      => '管理员账号不能小于4',
        'name.unique'   => '管理员账号已经存在',

        'password.require'  => '管理员密码不能为空',
        'password.max'      => '管理员密码不能大于12',
        'password.min'      => '管理员密码不能小于6',


    ];

}